import java.util.Arrays;
import java.util.Date;
/*import java.util.*;
import java.sql.*;


public class Student {

    //类是什么？
    //对象怎么产生？
    //怎么访问产生的对象里的方法和属性？
    //This是干什么用的？
    //
    private String name;
    public String gender;
    public int age;
    public double salary;


    public Student(String name,String gender,int age,double salary){
        this.name = name;
        this.gender = gender;
        this.age = age;
        this.salary = salary;
    }
    public void Doclass(){};
    public void Eating(){};
    public void Sleeping(){};


    *//*public static void main(String[] args) {
        Student student1 = new Student();
        student1.name = "coco";
        student1.gender = "女";
        student1.age = 15;
        student1.salary = 1234.5;

        student1.Doclass();
        student1.Eating();
        student1.Sleeping();

        Student student2 = new Student();
        student1.name = "Jack";
        student1.gender = "男";
        student1.age = 18;
        student1.salary = 5432.5;

        student1.Doclass();
        student1.Eating();
        student1.Sleeping();
    }*//*

    public static void main(String[] args) {
        Student student = new Student("王芳","女",39,2000.0);
    }

//    //java封装导入技巧
//    //比如日常的 Arrays
//    int[] array = new int[10];
//    Date date = new Date();
//    Arrays

}
public class Date {
    public int year;
    public int month;
    public int day;


    // 无参构造方法
    // 无参构造方法--内部给各个成员赋值初始值，该部分功能与三个参数的构造方法重复
    // 此处可以在无参构造方法中通过this调用带有三个参数的构造方法
// 但是this(1900,1,1);必须是构造方法中第一条语句
    public Date() {
//System.out.println(year); 注释取消掉，编译会失败————必须this()是第一条语句
        this(1900, 1, 1);
//this.year = 1900;
//this.month = 1;
//this.day = 1;
    }


    // 带有三个参数的构造方法
    public Date(int year, int month, int day) {
        this.year = year;
        this.month = month;
        this.day = day;
    }

}*/
public class Student {
    public String name;
    public String gender;
    public int age;
    public double score;
    public static String classRoom = "Bit306";

    public Student(String name, String gender, int age, double score) {
        this.name = name;
        this.gender = gender;
        this.age = age;
        this.score = score;
    }

    // ...
    public static void main(String[] args) {
// 静态成员变量可以直接通过类名访问
        System.out.println(Student.classRoom);
        Student s1 = new Student("Li leilei", "男", 18, 3.8);
        Student s2 = new Student("Han MeiMei", "女", 19, 4.0);
        Student s3 = new Student("Jim", "男", 18, 2.6);
// 也可以通过对象访问：但是classRoom是三个对象共享的
        System.out.println(s1.classRoom);
        System.out.println(s2.classRoom);
        System.out.println(s3.classRoom);
    }
}


